import os
import numpy as np

def gen_golden_data_simple():
    dtype = np.float32
    input_shape = [8, 2048]
    output_shape = [8, 2048]

    x = np.random.uniform(0, 1, input_shape).astype(dtype)
    y = np.random.uniform(0, 1, input_shape).astype(dtype)

    z = np.sum(np.multiply(x, y)).astype(dtype)
    print("z:", z)

    golden = np.zeros(output_shape, dtype=dtype)
    golden[0, 0] = z
    
    os.system("mkdir -p input")
    os.system("mkdir -p output")
    x.astype(dtype).tofile("./input/input_x.bin")
    y.astype(dtype).tofile("./input/input_y.bin")
    golden.tofile("./output/golden.bin")

if __name__ == "__main__":
    gen_golden_data_simple()

